Set up cloudflare wrangler

Wrangler is the cli tool for building cloudflare worker application, This article guides you to setup the tool

Installation

It's pretty straight forward, You simply invoke below command which installs wrangler cli

npm install @cloudflare/wrangler --global

Alternatively you could install using cargo as well

cargo install wrangler

Update

You could update the tool by npm

npm update --global @cloudflare/wrangler
cargo install wrangler --force  # NOTE: If you prefer cargo

Simple workflow

Let's create new project

wrangler generate simple-api --type=webpack

Let's start explore

wrangler dev

Now you could visit http://localhost:8787

Copyright 2020-2021 nerding_it ( HTML).
Last updated 2022-02-02 Wed 18:35.
Built with Emacs 27.2 (Org mode 9.4.4).
Subscribe to Weekly News Letter
We'll never share your email with anyone else.